<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

$api = app('Dingo\Api\Routing\Router');


$api->version('v1', function ($api) {
    $api->group(['namespace'=>'App\Http\Controllers\Api'],function ($api) {
        $api->any("/login","UserController@login");
        $api->any("/dish/get","DishController@getlist");
        $api->any("/dish/del","DishController@deldish");
        $api->any("/dish/save","DishController@save");
        $api->any("/badlist/get","BadListController@get");
        $api->any("/badlist/del","BadListController@del");
        $api->any("/badlist/save","BadListController@save");
        $api->any("/drug/get","DrugController@get");
        $api->any("/drug/del","DrugController@del");
        $api->any("/drug/save","DrugController@save");
        $api->any("/api/getdruglist","ApiController@getdruglist");
        $api->any("/api/dishcheck","ApiController@dishcheck");
    });
});